﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using Microsoft.Xna.Framework.Graphics;

namespace JeremiXnaGame
{
    class Helper
    {
        public static void Msg(string text)
        {
            Debug.WriteLine(text);
        }

        public static void TakeScreenShot(GraphicsDevice device)
        {
            PresentationParameters pp = device.PresentationParameters;

            ResolveTexture2D resolveTexture = new ResolveTexture2D(device, pp.BackBufferWidth, pp.BackBufferHeight, 1, device.DisplayMode.Format);

            device.ResolveBackBuffer(resolveTexture);
            resolveTexture.Save("screengrab.png", ImageFileFormat.Png);
        }
    }
}
